package net.cyndeline.scalarlib.rldungeon.dgs.graph

import scalax.collection.GraphEdge.UnDiEdge
import scalax.collection.GraphPredef.OuterEdge

/**
 * Methods needed by custom edges in the dgs system.
 */
trait DGSFunctionality[VType, EType[X] <: UnDiEdge[X] with DGSFunctionality[X, EType]] {

  /**
   * A method that only has to report the status set by setBottleneckStatus().
   * @return True if this edge must be traversed when visiting every room on a map.
   */
  def isBottleneck: Boolean

  /**
   * Sets this edges bottleneck status.
   * @param status True if this edge must be traversed when visiting every room on a map, otherwise false.
   * @return A copy of the edge with its bottleneck status set.
   */
  def setBottleneckStatus(status: Boolean): EType[VType] with OuterEdge[VType, EType]

  /**
   * Keeps track of how many additional responders that can be placed on an edge.If the edge is incapable of hosting
   * responders, this method should always return 0, as it is the only method used when examining responder capacity.
   * @return The amount of additional responders this edge can host.
   */
  def remainingResponderCapacity: Int

}
